home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: AMOS Basic Source Code Archive
(archive/amosSrc).
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 41 4d 4f 53 20 42 61 73 | 69 63 20 56 31 2e 30 30 |AMOS Bas|ic V1.00|
|00000010| 00 00 05 0c 2d 01 06 52 | 00 52 2a 2a 2a 2a 2a 2a |....-..R|.R******|
|00000020| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 57 45 |********|******WE|
|00000030| 4e 44 20 57 49 4c 4c 20 | 49 20 53 45 45 20 59 4f |ND WILL |I SEE YO|
|00000040| 55 20 41 47 41 49 4e 3f | 2d 42 79 20 4d 61 72 6b |U AGAIN?|-By Mark|
|00000050| 20 57 69 63 6b 73 6f 6e | 2a 2a 2a 2a 2a 2a 2a 2a | Wickson|********|
|00000060| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 20 00 00 28 01 |********|*** ..(.|
|00000070| 06 4a 00 48 20 41 73 20 | 77 69 74 68 20 6f 74 68 |.J.H As |with oth|
|00000080| 65 72 20 6c 6f 6f 70 73 | 2c 74 68 65 20 22 57 68 |er loops|,the "Wh|
|00000090| 69 6c 65 2e 2e 2e 57 65 | 6e 64 22 20 73 74 72 75 |ile...We|nd" stru|
|000000a0| 63 74 75 72 65 20 63 61 | 6e 20 62 65 20 75 73 65 |cture ca|n be use|
|000000b0| 64 20 74 6f 20 70 65 72 | 66 6f 72 6d 00 00 28 01 |d to per|form..(.|
|000000c0| 06 4a 00 48 20 74 61 73 | 6b 73 20 72 65 70 65 61 |.J.H tas|ks repea|
|000000d0| 74 65 64 6c 79 2c 62 75 | 74 20 74 68 65 20 73 70 |tedly,bu|t the sp|
|000000e0| 65 63 69 61 6c 20 74 68 | 69 6e 67 20 61 62 6f 75 |ecial th|ing abou|
|000000f0| 74 20 74 68 65 73 65 20 | 63 6f 6d 6d 61 6e 64 73 |t these |commands|
|00000100| 20 69 73 20 74 68 61 74 | 20 79 6f 75 00 00 22 01 | is that| you..".|
|00000110| 06 4a 00 3c 20 63 61 6e | 20 65 78 69 74 20 66 72 |.J.< can| exit fr|
|00000120| 6f 6d 20 74 68 65 20 6c | 6f 6f 70 20 69 66 20 61 |om the l|oop if a|
|00000130| 20 63 65 72 74 61 69 6e | 20 63 6f 6e 64 69 74 69 | certain| conditi|
|00000140| 6f 6e 20 69 73 20 61 63 | 68 69 65 76 65 64 2e 20 |on is ac|hieved. |
|00000150| 00 00 0d 01 06 4a 00 12 | 20 46 69 72 73 74 20 79 |.....J..| First y|
|00000160| 6f 75 20 77 72 69 74 65 | 3a 20 00 00 07 01 06 4a |ou write|: .....J|
|00000170| 00 06 20 57 68 69 6c 65 | 00 00 28 01 06 4a 00 48 |.. While|..(..J.H|
|00000180| 20 61 6e 64 20 74 68 65 | 6e 20 79 6f 75 20 77 72 | and the|n you wr|
|00000190| 69 74 65 20 74 68 65 20 | 63 6f 6e 64 69 74 69 6f |ite the |conditio|
|000001a0| 6e 20 66 6f 72 20 74 68 | 65 20 6c 6f 6f 70 20 74 |n for th|e loop t|
|000001b0| 6f 20 63 6f 6e 74 69 6e | 75 65 2d 53 6f 20 79 6f |o contin|ue-So yo|
|000001c0| 75 20 6d 69 67 68 74 20 | 00 00 28 01 06 4a 00 48 |u might |..(..J.H|
|000001d0| 20 77 61 6e 74 20 69 74 | 20 74 6f 20 63 6f 6e 74 | want it| to cont|
|000001e0| 69 6e 75 65 20 69 66 20 | 61 20 76 61 72 69 61 62 |inue if |a variab|
|000001f0| 6c 65 20 69 73 20 6c 65 | 73 73 20 74 68 61 6e 20 |le is le|ss than |
|00000200| 61 20 63 65 72 74 61 69 | 6e 20 6e 75 6d 62 65 72 |a certai|n number|
|00000210| 2d 49 6e 20 74 68 69 73 | 00 00 26 01 06 4a 00 44 |-In this|..&..J.D|
|00000220| 20 65 78 61 6d 70 6c 65 | 20 77 65 20 75 73 65 20 | example| we use |
|00000230| 74 68 65 20 76 61 72 69 | 61 62 6c 65 20 22 58 22 |the vari|able "X"|
|00000240| 2d 4d 61 6b 69 6e 67 20 | 74 68 65 20 6c 6f 6f 70 |-Making |the loop|
|00000250| 20 63 6f 6e 74 69 6e 75 | 65 20 75 6e 74 69 6c 20 | continu|e until |
|00000260| 22 58 22 20 00 00 0f 01 | 06 4a 00 16 20 65 71 75 |"X" ....|.J.. equ|
|00000270| 61 6c 73 20 31 30 30 2c | 6c 69 6b 65 20 74 68 69 |als 100,|like thi|
|00000280| 73 3a 00 00 0b 01 06 4a | 00 0e 20 57 68 69 6c 65 |s:.....J|.. While|
|00000290| 20 58 3c 3d 31 30 30 20 | 00 00 2a 01 06 4a 00 4c | X<=100 |..*..J.L|
|000002a0| 20 61 66 74 65 72 20 74 | 68 69 73 20 79 6f 75 20 | after t|his you |
|000002b0| 77 72 69 74 65 20 74 68 | 65 20 76 61 72 69 6f 75 |write th|e variou|
|000002c0| 73 20 63 6f 6d 6d 61 6e | 64 73 20 69 6e 73 69 64 |s comman|ds insid|
|000002d0| 65 20 74 68 65 20 6c 6f | 6f 70 2c 69 6e 20 74 68 |e the lo|op,in th|
|000002e0| 69 73 20 65 78 61 6d 70 | 6c 65 2c 20 00 00 2a 01 |is examp|le, ..*.|
|000002f0| 06 4a 00 4c 20 77 65 20 | 70 72 69 6e 74 20 74 68 |.J.L we |print th|
|00000300| 65 20 63 75 72 72 65 6e | 74 20 76 61 6c 75 65 20 |e curren|t value |
|00000310| 6f 66 20 22 58 22 2c 61 | 64 64 20 31 20 74 6f 20 |of "X",a|dd 1 to |
|00000320| 74 68 65 20 22 58 22 20 | 76 61 72 69 61 62 6c 65 |the "X" |variable|
|00000330| 2c 61 6e 64 20 77 61 69 | 74 20 70 6f 69 6e 74 20 |,and wai|t point |
|00000340| 00 00 28 01 06 4a 00 48 | 20 66 69 76 65 20 6f 66 |..(..J.H| five of|
|00000350| 20 61 20 73 65 63 6f 6e | 64 20 62 65 66 6f 72 65 | a secon|d before|
|00000360| 20 62 65 6f 69 6e 67 20 | 73 65 6e 74 20 62 61 63 | beoing |sent bac|
|00000370| 6b 20 74 6f 20 22 57 68 | 69 6c 65 22 20 77 69 74 |k to "Wh|ile" wit|
|00000380| 68 20 22 57 65 6e 64 22 | 2d 22 57 68 69 6c 65 22 |h "Wend"|-"While"|
|00000390| 00 00 26 01 06 4a 00 44 | 20 74 68 65 6e 20 63 68 |..&..J.D| then ch|
|000003a0| 65 63 6b 73 20 74 6f 20 | 73 65 65 20 69 66 20 74 |ecks to |see if t|
|000003b0| 68 65 20 63 65 72 74 61 | 69 6e 20 63 6f 6e 64 69 |he certa|in condi|
|000003c0| 74 69 6f 6e 20 69 73 20 | 73 74 69 6c 6c 20 69 6e |tion is |still in|
|000003d0| 20 6f 70 65 72 61 74 69 | 6f 6e 2d 20 00 00 27 01 | operati|on- ..'.|
|000003e0| 06 4a 00 46 20 49 6e 20 | 74 68 69 73 20 63 61 73 |.J.F In |this cas|
|000003f0| 65 20 69 66 20 22 58 22 | 20 69 73 20 65 71 75 61 |e if "X"| is equa|
|00000400| 6c 20 74 6f 20 6f 72 20 | 6c 65 73 73 20 74 68 61 |l to or |less tha|
|00000410| 6e 20 31 30 30 20 74 68 | 65 20 6c 6f 6f 70 20 63 |n 100 th|e loop c|
|00000420| 6f 6e 74 69 6e 75 65 73 | 2e 20 00 00 2a 01 06 4a |ontinues|. ..*..J|
|00000430| 00 4c 20 57 68 65 6e 20 | 74 68 65 20 63 6f 6e 64 |.L When |the cond|
|00000440| 69 74 69 6f 6e 73 20 63 | 68 61 6e 67 65 28 68 65 |itions c|hange(he|
|00000450| 72 65 2c 69 74 20 77 6f | 75 6c 64 20 6d 65 61 6e |re,it wo|uld mean|
|00000460| 20 58 3d 31 30 30 29 20 | 74 68 65 20 6c 6f 6f 70 | X=100) |the loop|
|00000470| 20 69 73 20 65 6e 64 65 | 64 20 61 6e 64 20 00 00 | is ende|d and ..|
|00000480| 10 01 06 4a 00 18 20 74 | 68 65 20 70 72 6f 67 72 |...J.. t|he progr|
|00000490| 61 6d 20 63 6f 6e 74 69 | 6e 75 65 73 2e 20 00 00 |am conti|nues. ..|
|000004a0| 0a 01 00 06 00 00 02 00 | 78 00 ff a2 00 3e 00 00 |........|x....>..|
|000004b0| 00 00 00 00 0c 01 02 68 | 00 64 00 06 00 00 02 00 |.......h|.d......|
|000004c0| 78 00 ff 7a 00 3e 00 00 | 00 64 00 00 12 04 04 76 |x..z.>..|.d.....v|
|000004d0| 13 c6 00 74 00 3e 00 00 | 00 00 00 5c 00 3e 00 00 |...t.>..|...\.>..|
|000004e0| 00 00 00 7c 00 64 00 06 | 00 00 02 00 78 00 00 00 |...|.d..|....x...|
|000004f0| 0f 04 00 06 00 00 02 00 | 78 00 ff a2 00 06 00 00 |........|x.......|
|00000500| 02 00 78 00 ff c0 00 3e | 00 00 00 01 00 00 06 04 |..x....>|........|
|00000510| 12 9e 00 3e 00 00 00 05 | 00 00 03 01 02 74 00 00 |...>....|.....t..|
|00000520| 41 6d 42 73 00 00 | |AmBs.. | |
+--------+-------------------------+-------------------------+--------+--------+